package cn.b.sky.mes.pp.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

import cn.b.sky.mes.cm.model.MateriaProcessAssign;
import cn.b.sky.mes.cm.model.WorkCenter;
import cn.b.sky.common.model.ImeCommon;

/**
 * 
 * <strong>Title : ProdcutionOrder.java<br></strong>
 * <strong>Package : cn.b.sky.mes.pp.model<br></strong>
 * <strong>Description : </strong>生产订单<br> 
 * <strong>Create on : 2015-10-8 下午5:55:01<br></strong>
 * <p>
 * @author lidapeng<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人 | 修改日期 | 修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class ProductionOrder extends ImeCommon implements Serializable {
  /** 
  * @Fields serialVersionUID : 序列化
  * @creator     :lidapeng
  */
  private static final long serialVersionUID = 1L;

  /**
   * 订单编号
   */
  private String productionOrderNum;

  /**
   * 产品订单编号
   */
  private String productOrderNum;

  /**
   * 新增订单类型字段
   */
  private String orderTypeCode;

  /**
   * 订单类型描述
   */
  private String orderTypeText;

  /**
   * 父级订单编号
   */
  private String parentOrderNum;

  /**
   * 顶级订单编号
   */
  private String topOrderNum;

  /**
   * 物料编号
   */
  private String materialCode;

  /**
   * 物料描述
   * 页面展示使用
   */
  private String materialText;

  /**
   * 工艺编号
   */
  private String processCode;

  /**
   * 工艺版本
   */
  private String processRev;

  /**
   * 工艺描述
   * 页面展示使用
   */
  private String processText;

  /**
   * 计划数量
   */
  private Double plannedQuantity;

  /**
   * 完工数量
   */
  private Double completedQuantity;

  /**
   * 报废数量
   */
  private Float scrappedQuantity;

  /**
   * 返修数量
   */
  private Float repairQuantity;

  /**
   * 订单状态
   */
  private String statuseCode;

  /**
   * 订单状态描述
   */
  private String statuseText;
  
  /**
   * 需求日期
   */
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date requirementDate;

  /**
   * 生产批号
   */
  private String productionlotNum;

  /**
   * 计划开始时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date plannedstartDateTime;

  /**
   * 计划结束时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date plannedendDateTime;

  /**
   * 实际开始时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date actualstartDateTime;

  /**
   * 实际结束时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date actualendDateTime;
  
  /**
   * sfc 订单
   */
  private List<ProductionControl> controls = new ArrayList<ProductionControl>();

  /**
   * 工作单元
   */
  private List<WorkCenter> workCenters = new ArrayList<WorkCenter>();

  /**
   * 此订单下的物料的工艺
   */
  private List<MateriaProcessAssign> processes = new ArrayList<MateriaProcessAssign>();

  
  private String productMaterialCode;//产品订单物料
  
  private Double releasedQuantity;//已下达数量
  /**
   * 客户
   */
  private String customer;
  /**
   * 客户订单
   */
  private String customerOrder;
  /**
   * 优先级
   */
  private Integer priority; 
  
  /**
   * 产量状态
   */
  private Integer outputStatus;
  
  /**
   * 量产状态描述
   */
  private String outputStatusText;
  
  /**
   * 计划日期是否超过今天,默认是，否则不是
   */
  private Boolean overToday = true;

  /**
   * 是否工序派工
   */
  private Integer operationScheduleFlag;
  /**
   * 附件
   */
  private List<ProductionOrderAttachment> attachment = new ArrayList<ProductionOrderAttachment>();
  
  public String getProductMaterialCode() {
    return productMaterialCode;
  }

  public void setProductMaterialCode(String productMaterialCode) {
    this.productMaterialCode = productMaterialCode;
  }

  public String getProductionOrderNum() {
    return productionOrderNum;
  }

  public String getProductOrderNum() {
    return productOrderNum;
  }

  public void setProductOrderNum(String productOrderNum) {
    this.productOrderNum = productOrderNum;
  }

  public String getOrderTypeCode() {
    return orderTypeCode;
  }

  public void setOrderTypeCode(String orderTypeCode) {
    this.orderTypeCode = orderTypeCode;
  }

  public String getOrderTypeText() {
    return orderTypeText;
  }

  public void setOrderTypeText(String orderTypeText) {
    this.orderTypeText = orderTypeText;
  }

  public void setProductionOrderNum(String productionOrderNum) {
    this.productionOrderNum = productionOrderNum;
  }

  public String getMaterialCode() {
    return materialCode;
  }

  public void setMaterialCode(String materialCode) {
    this.materialCode = materialCode;
  }

  public String getMaterialText() {
    return materialText;
  }

  public void setMaterialText(String materialText) {
    this.materialText = materialText;
  }

  public String getProcessCode() {
    return processCode;
  }

  public void setProcessCode(String processCode) {
    this.processCode = processCode;
  }

  public String getProcessRev() {
    return processRev;
  }

  public void setProcessRev(String processRev) {
    this.processRev = processRev;
  }

  public String getProcessText() {
    return processText;
  }

  public void setProcessText(String processText) {
    this.processText = processText;
  }

  public Double getPlannedQuantity() {
    return plannedQuantity;
  }

  public void setPlannedQuantity(Double plannedQuantity) {
    this.plannedQuantity = plannedQuantity;
  }

  public Double getCompletedQuantity() {
    return completedQuantity;
  }

  public void setCompletedQuantity(Double completedQuantity) {
    this.completedQuantity = completedQuantity;
  }

  public Float getScrappedQuantity() {
    return scrappedQuantity;
  }

  public void setScrappedQuantity(Float scrappedQuantity) {
    this.scrappedQuantity = scrappedQuantity;
  }

  public Float getRepairQuantity() {
    return repairQuantity;
  }

  public void setRepairQuantity(Float repairQuantity) {
    this.repairQuantity = repairQuantity;
  }

  public String getStatuseCode() {
    return statuseCode;
  }

  public void setStatuseCode(String statuseCode) {
    this.statuseCode = statuseCode;
  }

  public String getStatuseText() {
    return statuseText;
  }

  public void setStatuseText(String statuseText) {
    this.statuseText = statuseText;
  }

  public Date getRequirementDate() {
    return requirementDate;
  }

  public void setRequirementDate(Date requirementDate) {
    this.requirementDate = requirementDate;
  }

  public String getProductionlotNum() {
    return productionlotNum;
  }

  public void setProductionlotNum(String productionlotNum) {
    this.productionlotNum = productionlotNum;
  }

  public Date getPlannedstartDateTime() {
    return plannedstartDateTime;
  }

  public void setPlannedstartDateTime(Date plannedstartDateTime) {
    this.plannedstartDateTime = plannedstartDateTime;
  }

  public Date getPlannedendDateTime() {
    return plannedendDateTime;
  }

  public void setPlannedendDateTime(Date plannedendDateTime) {
    this.plannedendDateTime = plannedendDateTime;
  }

  public Date getActualstartDateTime() {
    return actualstartDateTime;
  }

  public void setActualstartDateTime(Date actualstartDateTime) {
    this.actualstartDateTime = actualstartDateTime;
  }

  public Date getActualendDateTime() {
    return actualendDateTime;
  }

  public void setActualendDateTime(Date actualendDateTime) {
    this.actualendDateTime = actualendDateTime;
  }

  public void setControls(List<ProductionControl> controls) {
    this.controls = controls;
  }

  public List<ProductionControl> getControls() {
    return controls;
  }

  public List<WorkCenter> getWorkCenters() {
    return workCenters;
  }

  public void setWorkCenters(List<WorkCenter> workCenters) {
    this.workCenters = workCenters;
  }

  public List<MateriaProcessAssign> getProcesses() {
    return processes;
  }

  public void setProcesses(List<MateriaProcessAssign> processes) {
    this.processes = processes;
  }

  public String getParentOrderNum() {
    return parentOrderNum;
  }

  public void setParentOrderNum(String parentOrderNum) {
    this.parentOrderNum = parentOrderNum;
  }

  public String getTopOrderNum() {
    return topOrderNum;
  }

  public void setTopOrderNum(String topOrderNum) {
    this.topOrderNum = topOrderNum;
  }

  public Double getReleasedQuantity() {
    return releasedQuantity;
  }

  public void setReleasedQuantity(Double releasedQuantity) {
    this.releasedQuantity = releasedQuantity;
  }

  public String getCustomer() {
    return customer;
  }

  public void setCustomer(String customer) {
    this.customer = customer;
  }

  public String getCustomerOrder() {
    return customerOrder;
  }

  public void setCustomerOrder(String customerOrder) {
    this.customerOrder = customerOrder;
  }

  public Integer getPriority() {
    return priority;
  }

  public void setPriority(Integer priority) {
    this.priority = priority;
  }

  public Integer getOutputStatus() {
    return outputStatus;
  }

  public void setOutputStatus(Integer outputStatus) {
    this.outputStatus = outputStatus;
  }

  public String getOutputStatusText() {
    return outputStatusText;
  }

  public void setOutputStatusText(String outputStatusText) {
    this.outputStatusText = outputStatusText;
  }

  public Boolean getOverToday() {
    return overToday;
  }

  public void setOverToday(Boolean overToday) {
    this.overToday = overToday;
  }

  public List<ProductionOrderAttachment> getAttachment() {
    return attachment;
  }

  public void setAttachment(List<ProductionOrderAttachment> attachment) {
    this.attachment = attachment;
  }

  public Integer getOperationScheduleFlag() {
    return operationScheduleFlag;
  }

  public void setOperationScheduleFlag(Integer operationScheduleFlag) {
    this.operationScheduleFlag = operationScheduleFlag;
  }
  
}
